REM --> Begin
REM --> Begin config
@ECHO OFF

set spacer=______________________________________________________________________________
title Minecraft installer
REM --> End config
REM --> Begin main menu
:Top
cls
color 17
echo %spacer%
echo.
echo $$$$$$$$$$$$    $$$$     $$$$    $$$$    .$$$$$$$$^|
echo     $$$$        $$$$     $$$$    $$$$    .$$F    $$^|
echo     $$$$        $$$$     $$$$    $$$$    .$$F    $$^|
echo     $$$$        $$$$$$$$$$$$$    $$$$    .$$$$$$$$^|
echo     $$$$        $$$$     $$$$    $$$$    .$$F    $$^|
echo     $$$$        $$$$     $$$$    $$$$    .$$F    $$^|
echo     $$$$        $$$$     $$$$    $$$$    .$$$$$$$$^|
echo %spacer%
echo.
echo Welcome to the Minecraft installer.
echo.
echo This installer was brought to you by ThibmoRozier.
echo.
echo Visit my project page at: 
echo http://code.google.com/p/custom-batch-file-creation
echo %spacer%
echo Select one of the options below:
echo.
echo "Play"		Start the game.
echo "Install"	Install the game.
echo "Version" 	Check your client version.
echo "About" 	About this installer.
echo "Exit"		Close the installer.
echo.
SET /P ANSWER= You choose: 
if /i {%ANSWER%}=={Play} (goto :Play)
if /i {%ANSWER%}=={Install} (goto :Install)
if /i {%ANSWER%}=={Version} (goto :Version)
if /i {%ANSWER%}=={About} (goto :About)
if /i {%ANSWER%}=={Exit} (goto :Exit)
REM --> End main menu
REM --> Begin play
:Play
cls
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\MinecraftSP.jar goto :Start1
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\MinecraftS.jar goto :Start2
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\minecraft.jar goto :Start3
goto :ErrorG
pause
REM --> Begin game start executors
:Start1
color 20
echo Starting the game now...
Start C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\MinecraftSP.jar
goto :Exit
:Start2
color 20
echo Starting the game now...
Start C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\MinecraftS.jar
goto :Exit
:Start3
color 20
echo Starting the game now...
Start C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\minecraft.jar
goto :Exit
REM --> End game start executors
REM --> Begin game file missing error
:ErrorG
color 40
echo 4572726F7220636F6465202D3230302D >C:\users\%USERNAME%\Desktop\error.txt
echo. >>C:\users\%USERNAME%\Desktop\error.txt
echo Please send this file to: thibmorozier@live.nl >>C:\users\%USERNAME%\Desktop\error.txt
echo. >>C:\users\%USERNAME%\Desktop\error.txt
echo Thanks for your co-operation. >>C:\users\%USERNAME%\Desktop\error.txt
echo %spacer%
echo Game file not found!
echo Error code 200
echo.
echo An error file has been saved to your desktop,
echo please send this file to thibmorozier@live.nl
echo.
echo Moving back to the menu.
echo %spacer%
pause
goto :Top
REM --> End game file missing error
REM --> End play
REM --> Begin install
:Install
cls
echo %spacer%
echo Welcome to the install section.
echo %spacer%
echo Select the version of Minecraft that you wish to install:
echo.
echo   1.0		Client version 1.0
echo   1.1		Client version 1.1
echo   1.2		Client version 1.2
echo   1.2.5		Client version 1.3.5
echo   1.3		Client version 1.3
echo   1.3.2		Client version 1.3.2
echo   Back 		Go back to the main menu.
echo.
set /P ANSWER=You choose: 
echo %spacer%
if /i {%ANSWER%}=={1.0} (goto :1.0)
if /i {%ANSWER%}=={1.1} (goto :1.1)
if /i {%ANSWER%}=={1.2} (goto :1.2)
if /i {%ANSWER%}=={1.2.5} (goto :1.2.5)
if /i {%ANSWER%}=={1.3} (goto :1.3)
if /i {%ANSWER%}=={1.3.2} (goto :1.3.2) 
if /i {%ANSWER%}=={Back} (goto :Top)
REM --> Begin Install versions
:1.0
cls
echo %spacer%
echo You chose to install client version 1.0
echo.
copy "files\1.0\minecraft.jar" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
copy "files\MinecraftS.jar" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
echo 1.0 >C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\version
echo Client version 1.0 has been installed.
echo %spacer%
echo Do you wish to install the desktop shortcut?
echo.
echo   Yes
echo   No
echo.
set /P ANSWER=You choose: 
if /i {%ANSWER%}=={Yes} (goto :yes)
if /i {%ANSWER%}=={No} (goto :no)
:1.1
cls
echo %spacer%
echo You chose to install client version 1.1
echo.
copy "files\1.1\minecraft.jar" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
copy "files\MinecraftS.jar" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
echo 1.1 >C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\version
echo Client version 1.1 has been installed.
echo %spacer%
echo Do you wish to install the desktop shortcut?
echo.
echo   Yes
echo   No
echo.
set /P ANSWER=You choose: 
if /i {%ANSWER%}=={Yes} (goto :yes)
if /i {%ANSWER%}=={No} (goto :no)
:1.2
cls
echo %spacer%
echo You chose to install client version 1.2
echo.
copy "files\1.2\minecraft.jar" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
copy "files\MinecraftS.jar" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
echo 1.2 >C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\version
echo Client version 1.2 has been installed.
echo %spacer%
echo Do you wish to install the desktop shortcut?
echo.
echo   Yes
echo   No
echo.
set /P ANSWER=You choose: 
if /i {%ANSWER%}=={Yes} (goto :yes)
if /i {%ANSWER%}=={No} (goto :no)
:1.2.5
cls
echo %spacer%
echo You chose to install client version 1.2.5
echo.
copy "files\1.2.5\minecraft.jar" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
copy "files\MinecraftS.jar" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
echo 1.2.5 >C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\version
echo Client version 1.2.5 has been installed.
echo %spacer%
echo Do you wish to install the desktop shortcut?
echo.
echo   Yes
echo   No
echo.
set /P ANSWER=You choose: 
if /i {%ANSWER%}=={Yes} (goto :yes)
if /i {%ANSWER%}=={No} (goto :no)
:1.3
cls
echo %spacer%
echo You chose to install client version 1.3
echo.
copy "files\1.3\minecraft.jar" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
copy "files\MinecraftS.jar" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
echo 1.3 >C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\version
echo Client version 1.3 has been installed.
echo %spacer%
echo Do you wish to install the desktop shortcut?
echo.
echo   Yes
echo   No
echo.
set /P ANSWER=You choose: 
if /i {%ANSWER%}=={Yes} (goto :yes)
if /i {%ANSWER%}=={No} (goto :no)
:1.3.2
cls
echo %spacer%
echo You chose to install client version 1.3.2
echo.
copy "files\1.3.2\minecraft.jar" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
copy "files\MinecraftS.jar" "C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin"
echo 1.3.2 >C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\version
echo Client version 1.3.2 has been installed.
echo %spacer%
echo Do you wish to install the desktop shortcut?
echo.
echo   Yes
echo   No
echo.
set /P ANSWER=You choose: 
if /i {%ANSWER%}=={Yes} (goto :yes)
if /i {%ANSWER%}=={No} (goto :no)
REM --> End install versions
REM --> Begin shortcut
:yes
copy "files\Minecraft.lnk" "C:\users\%USERNAME%\Desktop"
echo %spacer%
pause
start files\minecraftS.jar
goto :Exit
:no
echo %spacer%
start files\minecraftS.jar
goto :Exit
REM --> End shortcut
REM --> End install
REM --> Begin version
:Version
if exist C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\version goto :Result
goto :ErrorV
pause
REM --> Begin version result
:Result
cls
echo %spacer%
echo.
set /p version=< C:\Users\%USERNAME%\AppData\Roaming\.minecraft\bin\version
echo Your current game version is: %version%
echo.
echo Moving you back to the menu.
echo %spacer%
echo.
pause
goto :Top
REM --> End version result
REM --> Begin version error
:ErrorV
cls
color 40
echo 4572726F7220636F6465202D3230352D >C:\users\%USERNAME%\Desktop\error.txt
echo. >>C:\users\%USERNAME%\Desktop\error.txt
echo Please send this file to: thibmorozier@live.nl >>C:\users\%USERNAME%\Desktop\error.txt
echo. >>C:\users\%USERNAME%\Desktop\error.txt
echo Thanks for your co-operation. >>C:\users\%USERNAME%\Desktop\error.txt
echo %spacer%
echo Version file not found!
echo Error code 205
echo.
echo An error file has been saved to your desktop,
echo please send this file to thibmorozier@live.nl
echo.
echo Moving you back to the menu.
echo %spacer%
pause
goto :Top
REM --> End version error
REM --> End version
REM --> Begin about
:About
cls
color 17
echo %spacer%
echo    This launcher was brought to you by ThibmoRozier.
echo.
echo    Visit my project page at: 
echo    http://code.google.com/p/custom-batch-file-creation
echo.
echo    For questions and buggs please contact me on my email:
echo    "thibmorozier@live.nl"
echo.
echo    Moving you back to the menu.
echo %spacer%
pause
goto :top
REM --> End about
REM --> Begin exit
:Exit
cls
color 17
echo %spacer%
echo Thank you for using this installer.
echo.
echo Please share this file to who ever you want.
echo.
echo Credits for the origional game files all go to the Minecraft team.
echo.
echo Closing the installer now...
echo %spacer%
PING -n 6 127.0.0.1>nul
exit
REM --> End exit
REM --> End